package org.example.service;


import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,
        chatModel = "qwenChatModel",
        chatMemoryProvider = "charMemoryProvider"
)
public interface SeparateChatAssistant {
    /**
     * 分离聊天记录
     * @param memoryId 聊天id
     * @param userMessage 用户消息
     * @return
     */
//    @SystemMessage("你是我的好朋友，请用东北话回答问题，今天是{{current_date}}")
//    String chat(@MemoryId int memoryId, @UserMessage String userMessage);

//    @SystemMessage(fromResource = "my_prompt_system.txt")
//    String chat(@MemoryId int memoryId, @UserMessage String userMessage);


    @UserMessage("请用东北话回答问题，{{message}}")
    String chat(@MemoryId int memoryId, @V("message") String userMessage);


    @SystemMessage(fromResource = "my_prompt_system.txt")
    String chat1(
            @MemoryId int memoryId,
            @UserMessage String userMessage,
            @V("username") String username,
            @V("age") int age
    );

}
